GCD of two numbers in java